#pragma once

#include <rclcpp/logging.hpp>
#include <utils/singleton.h>

namespace rclcpp {
class Node;
class Logger;
class ParameterEventHandler;
class ParameterCallbackHandle;
}

namespace fusion_perception {

class Global : public utils::Singleton<Global> {
    friend class utils::Singleton<Global>;

private:
    Global(void);

public:
    rclcpp::Logger getLogger(void);
    std::shared_ptr<rclcpp::Node> getNode(void);

private:
    std::shared_ptr<rclcpp::Node> node_ { nullptr };
    std::shared_ptr<rclcpp::ParameterEventHandler> parameterEventHandler_ { nullptr };
    std::vector<std::shared_ptr<rclcpp::ParameterCallbackHandle>> parameterCallbackHandles_;

public:
    bool isRecord { true };
    int32_t hz { 24 };
    int32_t predictS { 1 };
    double Q { 5.0e-3 };
    double R { 1.0e-1 };
    double dxThreshold = 10.0;
    double dyThreshold = 10.0;
    double headingThreshold = 90.0;
};
}
